package pri.syl.xiaowu.websocket.netty.server.handler.core.factory;

import io.netty.channel.Channel;
import io.netty.handler.timeout.IdleState;

/**
 * ClassName: HttpServerHandlerFactory
 * Description: 空闲事件，关闭channel
 */
public class HttpServerHandlerFactory {
    private HttpServerHandlerFactory() {
    }

    public static void userEventTriggered(Channel channel, IdleState state) {
        if (IdleState.READER_IDLE == state) {
            channel.close();
        }
    }

}
